package app.esb.common;

import java.lang.reflect.Constructor;
import java.util.HashMap;
import java.util.Map;
/**
 * 反射处理类
 * @author JiaJ
 *
 */
public class BussRef {
	
	public static Map<String, Constructor> consMaps = new HashMap<String, Constructor>();
	
	public static Constructor getConstructor(String classPath){	
		if(consMaps.containsKey(classPath)){
			return consMaps.get(classPath);
		}else{		
			try {
				Class clazz = Class.forName(classPath);
		        Constructor c = clazz.getConstructor(String.class);
		        consMaps.put(classPath, c);
		        return c;
			} catch (Exception e) {
				return null;
			}	
		}
		
	}
	
}
